package com.egg.ylt.pojo;

import java.util.List;

/**
 * author:        yupeng
 * created on:    2019/3/1 14:29
 * description:   优惠券模型
 */
public class CouponEntity {

    public static final String TYPE_EXP = "0";
    public static final String TYPE_FILL_TO_DEDUCT = "1";
    public static final String TYPE_BUY_TO_DISCOUNT = "2";
    public static final String TYPE_BUY_TO_GIVE = "3";

    private List<ListEntity> list;

    public List<ListEntity> getList() {
        return list;
    }

    public void setList(List<ListEntity> list) {
        this.list = list;
    }

    public static class ListEntity {

        public ListEntity() {}

        public ListEntity(String endDate, String startDate, String ticketName, String ticketAmount, String status) {
            this.endDate = endDate;
            this.startDate = startDate;
            this.ticketName = ticketName;
            this.ticketAmount = ticketAmount;
            this.status = status;
        }

        /**
         * endDate :
         * startDate :
         * ticketName :
         * limitAmount :
         * ticketAmount :
         * isShare :
         * ticketType :
         * ticketId :
         * status :
         * memberCompanyId :
         * activityId :
         */

        private String endDate;
        private String startDate;
        private String ticketName;
        private String limitAmount;
        private String ticketAmount;
        private String isShare;
        private String ticketType;
        private String ticketId; // 优惠券类型 0-体验券，1-满减券，2-买折券，3-买赠券
        private String status;
        private String memberCompanyId;
        private String companyId;
        private String ticketSubName;
        private String activityId;
        private String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getEndDate() {
            return endDate;
        }

        public void setEndDate(String endDate) {
            this.endDate = endDate;
        }

        public String getStartDate() {
            return startDate;
        }

        public void setStartDate(String startDate) {
            this.startDate = startDate;
        }

        public String getTicketName() {
            return ticketName;
        }

        public void setTicketName(String ticketName) {
            this.ticketName = ticketName;
        }

        public String getLimitAmount() {
            return limitAmount;
        }

        public void setLimitAmount(String limitAmount) {
            this.limitAmount = limitAmount;
        }

        public String getTicketAmount() {
            return ticketAmount;
        }

        public void setTicketAmount(String ticketAmount) {
            this.ticketAmount = ticketAmount;
        }

        public String getIsShare() {
            return isShare;
        }

        public void setIsShare(String isShare) {
            this.isShare = isShare;
        }

        public String getTicketType() {
            return ticketType;
        }

        public void setTicketType(String ticketType) {
            this.ticketType = ticketType;
        }

        public String getTicketId() {
            return ticketId;
        }

        public void setTicketId(String ticketId) {
            this.ticketId = ticketId;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getMemberCompanyId() {
            return memberCompanyId;
        }

        public void setMemberCompanyId(String memberCompanyId) {
            this.memberCompanyId = memberCompanyId;
        }

        public String getCompanyId() {
            return companyId;
        }

        public void setCompanyId(String companyId) {
            this.companyId = companyId;
        }

        public String getTicketSubName() {
            return ticketSubName;
        }

        public void setTicketSubName(String ticketSubName) {
            this.ticketSubName = ticketSubName;
        }

        public String getActivityId() {
            return activityId;
        }

        public void setActivityId(String activityId) {
            this.activityId = activityId;
        }

        @Override
        public boolean equals(Object obj) {
            if (this == obj) return true;
            if (obj == null || getClass() != obj.getClass()) return false;

            ListEntity entity = (ListEntity) obj;
            return entity.equals(entity.ticketId);
        }

        @Override
        public int hashCode() {
            int result = ticketId != null ? ticketId.hashCode() : 0;
            result = 31 * result + (ticketName != null ? ticketName.hashCode() : 0);
            return result;
        }
    }

}
